package com.example.demo.service.impl;

import com.example.demo.dao.WarehouseDao;
import com.example.demo.pojo.Warehouse;
import com.example.demo.service.WarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WarehouseServiceImpl implements WarehouseService {
    @Autowired
    private WarehouseDao warehouseDao;
    @Override
    public int deleteByPrimaryKey(Integer repertoryid) {
        return warehouseDao.deleteByPrimaryKey(repertoryid);
    }

    @Override
    public int insert(Warehouse record) {
        return warehouseDao.insert(record);
    }

    @Override
    public int insertSelective(Warehouse record) {
        return warehouseDao.insertSelective(record);
    }

    @Override
    public Warehouse selectByPrimaryKey(Integer repertoryid) {
        return warehouseDao.selectByPrimaryKey(repertoryid);
    }

    @Override
    public Warehouse selectByName(String name) {
        return warehouseDao.selectByName(name);
    }

    @Override
    public Warehouse selectByUserId(Integer backgroundUserId) {
        return warehouseDao.selectByUserId(backgroundUserId);
    }

    @Override
    public int updateByPrimaryKeySelective(Warehouse record) {
        return warehouseDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Warehouse record) {
        return warehouseDao.updateByPrimaryKey(record);
    }

    @Override
    public List<Warehouse> selectAll() {
        return warehouseDao.selectAll();
    }

    @Override
    public int updWareUserName(String userName, int userId) {
        return warehouseDao.updWareUserName(userName,userId);
    }
}
